package com.example.chinese;

import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

public class Star_3 extends AppCompatActivity {
    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity3);
        Button bt7=(Button)findViewById(R.id.bt7);
        Button bt8=(Button)findViewById(R.id.bt8);
        bt7.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SharedPreferences sp=getSharedPreferences("data",MODE_PRIVATE);
                SharedPreferences.Editor editor=sp.edit();
                editor.putString("name4","去休息因缺少训练考核失败而淘汱");
                editor.commit();
                Intent intent7=new Intent(Star_3.this,Star_14.class);
                startActivity(intent7);
            }
        });

        bt8.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                SharedPreferences sp=getSharedPreferences("data",MODE_PRIVATE);
                SharedPreferences.Editor editor=sp.edit();
                editor.putString("name4","\"训练时得到帮助，但疲惫的你此时继续训练");
                editor.commit();
                Intent intent8=new Intent();
                intent8.setClass(Star_3.this,Star_4.class);
                startActivity(intent8);
            }
        });
    }
}
